<?php
    function __realpath($path) {
        $path = str_replace('\\','/',realpath($path));
        if ($path{1} == ':') {
            // We can't just check for C:/, because windows users may have the IIS webroot on X: or F:, etc.
            $path = substr($path,2);
        }
        return $path;
    }

    function exponent_unhtmlentities( $str )
    {
        $trans = get_html_translation_table(HTML_ENTITIES);
        $trans['&apos;'] = '\'';
        $trans=array_flip($trans);

        $trans['&apos;'] = '\'';
        $trans['&#039;'] = '\'';
        return strtr($str, $trans);
    }
?>
